package com.aaa.service.impl;

import com.aaa.dao.Flim_OrderDao;
import com.aaa.entity.Flim_Order;
import com.aaa.service.Flim_OrderService;
import com.aaa.util.TableData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class Flim_OrderServiceImpl implements Flim_OrderService {
    @Autowired
    private Flim_OrderDao flim_orderDao;
    public TableData<Flim_Order> page(String keyword, Integer page, Integer limit) {

            TableData<Flim_Order> tableData=new TableData<Flim_Order>();
            Integer offset=(page-1)*limit;
            List<Flim_Order> data = flim_orderDao.listPage(keyword, offset, limit);
            tableData.setData(data);
            Integer count=flim_orderDao.count(keyword);
            tableData.setCount(count);
            return tableData;
        }
    }

